package xin.marcher.module.rights.converter;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import xin.marcher.module.rights.domain.dto.PermissionDTO;
import xin.marcher.module.rights.domain.entity.PermissionDO;
import xin.marcher.module.rights.domain.request.PermissionRequest;

import java.util.List;

/**
 *
 */
@Mapper(componentModel = "spring")
public interface PermissionConverter {

    @Mapping(target = "updateUser", source = "operateUser")
    PermissionDO convertDO(PermissionRequest request);

    PermissionDTO convertDTO(PermissionDO permissionDO);

    List<PermissionDTO> convertDTOs(List<PermissionDO> permissionDOS);

}
